<!-- @format -->
<script setup>
	import { ref } from 'vue'

	const msg = ref('')
</script>

<template>
	<p>{{ msg }}</p>
	<!-- v-model -->
	<input
		type="text"
		v-model="msg" />
	<br />
	<br />
	<br />

	<!-- :value+@input 实现 v-model -->
	<input
		type="text"
		:value="msg"
		@input="msg = $event.target.value" />
</template>

<style scoped></style>
